package com.industrial.im.service.impl;

import cn.hutool.core.util.IdUtil;
import com.industrial.im.mapper.MsgGroupInfoMapper;
import com.industrial.im.service.IMsgGroupInfoService;
import org.springframework.stereotype.Service;

@Service
public class MsgGroupInfoServiceImpl implements IMsgGroupInfoService {

    private final MsgGroupInfoMapper groupInfoMapper;

    public MsgGroupInfoServiceImpl(MsgGroupInfoMapper groupInfoMapper) {
        this.groupInfoMapper = groupInfoMapper;
    }

    @Override
    public void saveGroupInfo(String groupName) {
        groupInfoMapper.saveGroupInfo(IdUtil.simpleUUID(), groupName);
    }

    @Override
    public int selectGroupNameCount(String groupName) {

        return groupInfoMapper.selectGroupNameCount(groupName);
    }
}
